
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #div1{
            width: 100px;
            height: 100px;
            background: red}
    </style>
    <script>
        window.onload=function (){
            document.getElementById("div1").addEventListener("click",function (){
                this.style.width=200+'px';
                this.style.height=200+'px';
            });
            document.getElementById("div1").addEventListener("mouseleave",function (){
                this.style.width=100+'px';
                this.style.height=100+'px';
            });
        }
    </script>
</head>
<body>
<div id="div1"></div>
</body>
</html>




